package com.yunchang.springboot.mapper.mwsreport;

import com.yunchang.springboot.models.mwsreportbean.MwsReimbursements;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MwsReimbursementsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MwsReimbursements record);

    int insertSelective(MwsReimbursements record);

    MwsReimbursements selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MwsReimbursements record);

    int updateByPrimaryKey(MwsReimbursements record);

    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<MwsReimbursements> selectByCreateTime(String time);

    /**
     * 根据是否生成财务数据获取对应的数据，limitValue指定获取数据的数量
     * @param financeStatus
     * @param limitValue
     * @param date
     * @return
     */
    List<MwsReimbursements> selectByFinanceStatus(@Param("financeStatus") Integer financeStatus,@Param("limitValue") Integer limitValue,@Param("date") String date);

    /**
     * 根据参数获取AmazonOrderId
     * @param sellerId
     * @param originalReimbursementId
     * @return
     */
    String selectAmazonOrderIdBySellerIdAndOriginalReimbursementId(String sellerId,String originalReimbursementId);

    /**
     * 根据mwsReimbursementsList对象集合对financeStatus更新
     * @param mwsReimbursementsList
     * @return
     */
    int updateFinanceStatusByMwsReimbursementsList(@Param("mwsReimbursementsList") List<MwsReimbursements> mwsReimbursementsList);
}